<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <common-head></common-head>
  </div>
  <script src="./vue.js"></script>
  <script>
    const Logo = {
      template: `
          <div>
            <h3>这是一个局部组件</h3>  
          </div>
         `
    }
    const CommonHead = {
      template: `
       <div>
         <h2>这是一个公共的头部</h2>  
         <logo></logo>
       </div>
     `,
      
      components: {
        Logo
      }
    }
    Vue.component('CommonHead', CommonHead);
    // 相当于定义一个 组件构造函数 VueComponent(继承Vue)
    const vm = new Vue({
      el: '#app'
    })
  </script>
</body>

</html>